<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE xsl:stylesheet SYSTEM "lang://photos">

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">	
	
	<xsl:include href="../main.xsl" />
	<xsl:include href="menu.xsl" />
	<xsl:include href="../common/form.xsl" />

	<xsl:template match="/data">
		<html>
		
		<head>
			<title>
				<xsl:value-of select="$pageTitle" />
			</title>
			<xsl:call-template name="meta-head" />
			<link rel="stylesheet" href="{$baseURI}/css/forms.css" type="text/css" media="all" />
			<script type="text/javascript" src="{$baseURI}/js/simpleEditor.js" />
		</head>
		<body>
			
			<xsl:call-template name="top-userbar" />

			<div id="header">
				<xsl:call-template name="logo" />

				<xsl:call-template name="menu" />
			</div>

			<div id="blocks">
				<div id="blocks_inner">
					<xsl:call-template name="default-blocks-top" />
				</div>
			</div>

			<div id="content">
				<div id="content_inner">
					<xsl:apply-templates select="response" />
				</div>
			</div>

			<xsl:call-template name="footer" />
		</body>
		</html>
	</xsl:template>
	
	<xsl:template match="response">
		<xsl:if test="../@method = 'create_album'">
			<h1>&labelNewAlbum;</h1>
		</xsl:if>
		
		<xsl:if test="../@method = 'edit_album'">
			<h1>&labelEditAlbum;</h1>
		</xsl:if>
		
		<xsl:apply-templates select="message" />
		
		<form action="{$baseURI}/photos/create_album/save" method="post" enctype="multipart/form-data">
			<xsl:if test="../@method = 'edit_album'">
				<xsl:attribute name="action">
					<xsl:value-of select="concat ($baseURI, '/photos/edit_album/', $formPrefix, '/save')" />
				</xsl:attribute>
			</xsl:if>
			
			<xsl:apply-templates select="form" />
			
			<p>
				<input type="submit" value="&labelSaveButton;" />		
			</p>
		</form>
	</xsl:template>
	
</xsl:stylesheet>